<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center">
                <div class="table-first-id">ID</div>
            </th>
            <th class="text-center" width="12%">课程名称</th>
            <th class="text-center" width="20%">专业/科目</th>
            <th class="text-center" width="10%">售价</th>
            <th class="text-center" width="10%">购买量</th>
            <th class="text-center" width="10%">评论人次</th>
            <th class="text-center" width="11%">综合评分</th>
            <th class="text-center" width="12%">讲师</th>
            <th class="text-center" width="10%">操作</th>
        </tr>
        </thead>
    </table>

    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody id="tbodyMaterial">
            <tr class="jqgfirstrow" role="row">
                <th class="text-center">
                    <div class="table-first-id">&nbsp;</div>
                </th>
                <th class="text-center" width="12%"></th>
                <th class="text-center" width="20%"></th>
                <th class="text-center" width="10%"></th>
                <th class="text-center" width="10%"></th>
                <th class="text-center" width="10%"></th>
                <th class="text-center" width="11%"></th>
                <th class="text-center" width="12%"></th>
                <th class="text-center" width="10%"></th>
            </tr>

            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="9" class="text-center">
                <div class="noDataTipsBox">
                    <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                </div>
                </td>
            </tr>

            <tr th:if="not ${#lists.isEmpty(dataMap['list'])}" th:each="course: ${dataMap['list']}">
                <td class="text-center">
                    <input type="checkbox" class="i-checks" th:value="${course['id']}">
                </td>
                <td class="text-center" th:text="${course['courseName']}"></td>
                <td class="text-center">
                    <th:block th:if="!${#lists.isEmpty(course['subjectList'])}">
                        <span class="pie" th:each="subject,subIndex : ${course['subjectList']}">
                            <th:block th:text="${subject['subjectName']}+'/'"></th:block>
                            <th:block th:if="!${#lists.isEmpty(subject['childSubjectList'])}" th:each="child,index : ${subject['childSubjectList']}">
                                <th:block th:if="${index.last} == false" th:text="${child['subjectName']}+'/'"></th:block>
                                <th:block th:if="${index.last} == true" th:text="${child['subjectName']}"></th:block>
                            </th:block>
                            <th:block th:if="${#lists.isEmpty(subject['childSubjectList'])}">全部科目</th:block>
                            <th:block th:if="${subIndex.last}==false" th:utext="'<br/>'"></th:block>
                        </span>
                    </th:block>
                    <th:block th:if="${#lists.isEmpty(course['subjectList'])}">
                        <span class="pie">—</span>
                    </th:block>
                </td>
                <td class="text-center" th:text="${course['realPrice']}"></td>
                <td class="text-center" th:text="${course['courseProfile']['buyCount']}">${course.courseProfile.buyCount}</td>
                <td class="text-center" th:text="${course['courseProfile']['commentCount']}"></td>
                <td class="text-center" th:text="${course['courseProfile']['multiple']}"></td>
                <td class="text-center">
                    <span th:if="${#lists.isEmpty(course['teacherList'])}"> — </span>
                    <span th:if="not ${#lists.isEmpty(course['teacherList'])}" th:each="teacher, index : ${course['teacherList']}" th:text="${index.index < index.size - 1} ? ${teacher.teacherName} + '/' : ${teacher.teacherName}"></span>
                </td>
                <td class="text-center">
                    <a th:href="@{/admin/course/profile/courseProfileDetailList?courseId={id}(id=${course['id']})}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="课程评价明细"><i class="fa fa-eye"></i></a>
                </td>
                </tr>
            </tbody>
        </table>
    </div>

    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>

</html>
